//OUR PROJECT PERFORMED DEPEND ON FACT //DEPEND ON HARMONY HOTEL..... //some library function #include #include//returned by getch(); #include//strcpy strcmt strcat example ....strcpy(Nebyu,mustefa) #include//example... nebiyu=mustefa #include//color #define E_Dollar 29.23//can't change using namespace std; //Function declaration void effect();//function declaration for compiler void S_info();//function declaration for compiler void H_info();//function declaration for compiler void C_member();//function declaration for compiler //creating first class class room_feature//this class created to display full information about Harmony Hotel'S ROOM { public: void type1()//function definition { char f;//declaring a variable for the data type (character) //it is information for the customer to choose one from the list cout<<"FOR FULL INFORMATION TAB (e) BUTTON"<>f; if(f=='e')//comparing variables { //if the user input is "e" this is the information cout<<"1.Sheba Queen_Room"<>> Type4 le"; cout<<"\n\n Room charges-->Rs.1250 per day"; cout<<"\n\n 1. Bed>>>1"; cout<<"\n\n 2. Capacity>>>2"; cout<<"\n\n 3.Balcony "; cout<<"\n--------------------------------------------------"; cout<<"\nADDITIONAL FEATURES"; cout<<"\n--------------------------------------------------"; cout<<"\n\n 2.Geyser "; cout<<"\n\n 3.TV"; cout<<"\n--------------------------------------------------"; } } void type2() { char f;//it is similar with the above method cout<<"FOR FULL INFORMATION TAB (e) BUTTON"<>f; if(f=='e') { cout<<"2.Royal king Rooms"< Type4 le delux"; cout<<"\n\n Room charges>>> Rs.1500 per day"; cout<<"\n\n 1. Bed>>>1"; cout<<"\n\n 2.Capacity>>>2"; cout<<"\n\n 3.Balcony"; cout<<"\n--------------------------------------------------"; cout<<"\nADDITIONAL FEATURES"; cout<<"\n--------------------------------------------------"; cout<<"\n\n 1.A/C"; cout<<"\n\n 2.Geyser "; cout<<"\n\n 3.TV"; cout<<"\n--------------------------------------------------"; } } void type3() { char f; cout<<"FOR FULL INFORMATION TAB (e) BUTTON"<>f; if(f=='e') { cout<<"Standard twin room"< travel able"; cout<<"\n\n Room charges-->"<7"; cout<<"\n\n 2. Capacity>>>8"; cout<<"\n\n 3.Balcony "; cout<<"\n--------------------------------------------------"; cout<<"\nADDITIONAL FEATURES"; cout<<"\n--------------------------------------------------"; cout<<"\n\n 2.Geyser "; cout<<"\n\n 3.TV"; cout<<"\n--------------------------------------------------"; } } void type4() { char f; cout<<"FOR FULL INFORMATION TAB (e) BUTTON"<>f; if(f=='e') { cout<<"Furnished Deluxe Room"< General"; cout<<"\n\n Room charges-->"<>>6"; cout<<"\n\n 2.Capacity>>>7"; cout<<"\n\n 3.High internet speed\n"; cout<<"\n###################################################"; cout<<"\nADDITIONAL FEATURES"; cout<<"\n###################################################"; cout<<"\n\n 1.Geyser "; cout<<"\n\n 2.36 inch tv"; cout<<"\n\n 3.24 hour room service"; cout<<"\n\n 4.IPTV services"; } } void type5() { char f; cout<<"FOR FULL INFORMATION TAB (e) BUTTON"<>f; if(f=='e') { cout<<"Emperor Suite room"< General"; cout<<"\n\n Room charges-->"<>>6"; cout<<"\n\n 2.Capacity>>>7"; cout<<"\n\n 3.High internet speed\n"; cout<<"\n###################################################"; cout<<"\nADDITIONAL FEATURES"; cout<<"\n###################################################"; cout<<"\n\n 1.Geyser "; cout<<"\n\n 2.36 inch tv"; cout<<"\n\n 3.24 hour room service"; cout<<"\n\n 4.IPTV services"; } } void type6() { char f; cout<<"FOR FULL INFORMATION TAB (e) BUTTON"<>f; if(f=='e') { cout<<"Junior Presidential Room"< Deluxe"; cout<<"\n\n Room charges-->"<4"; cout<<"\n\n 2.Capacity-->7"; cout<<"\n###################################################\n"; cout<<"\nADDITIONAL FEATURES"; cout<<"\n###################################################\n"; cout<<"\n\n 1.A/C"; cout<<"\n\n 2.Geyser "; cout<<"\n\n 3.32 inchTV"; cout<<"\n\n 4.24 hour room service"; cout<<"\n###################################################\n"; } } void type7() { char f; cout<<"FOR FULL INFORMATION TAB (e) BUTTON"<>f; if(f=='e') { cout<<"Presidential suite room"<Deluxe"; cout<<"\n\n Room charges : "<3"; cout<<"\n\n 2.Capacity-->6"; cout<<"\n\n 3.High speed Internet available"; cout<<"\n###################################################"; cout<<"\nADDITIONAL FEATURES"; cout<<"\n###################################################"; cout<<"\n\n 1.A/C"; cout<<"\n\n 2.Geyser"; cout<<"\n\n 3.34 inch TV"; cout<<"\n--------------------------------------------------"; } } }; class room_and_food//this class created to perform about room & food and related issues { //we are not used a private keyword because this class maybe can derive to other class..... public: int room_no,customer_mem,room_per; //declaring integer variables int no,charge,per,T_Room_A,F_No,F_per,Food_A; //declaring integer variables float F_price,room_charge; //declaring float variables //declaring character variables char r_cust[20],c_city[20],customer_nat[20]; char room_avail,type[20],customer[20],avail,room_type[20]; string F_type,F_customer;//it is the way of declaring strings //this function returning room availability to the function get availability char getavail()//Function definition to return room availability { return(room_avail); } //the following functions are created to hold each room attribute. //method of Initializing // void No_r1() { room_no=1; strcpy(room_type,"Sheba Queen_R"); room_charge=E_Dollar*150; room_avail='Y'; strcpy(r_cust,"N.A"); room_per=0; T_Room_A=26; } void No_r2() { room_no=2; strcpy(room_type,"Royal King_R"); room_charge=E_Dollar*200; room_avail='Y'; strcpy(r_cust,"N.A"); room_per=0; T_Room_A=22; } void No_r3() { room_no=3; strcpy(room_type,"Standard Twin_R"); room_charge=E_Dollar*224; room_avail='Y'; strcpy(r_cust,"N.A"); room_per=0; T_Room_A=16; } void No_r4() { room_no=4; strcpy(room_type,"Furnished Deluxe_R"); room_charge=E_Dollar*255; room_avail='Y'; strcpy(r_cust,"N.A"); room_per=0; T_Room_A=13; } void No_r5() { room_no=5; strcpy(room_type,"Emperor Suite_R"); room_charge=E_Dollar*278; room_avail='Y'; strcpy(r_cust,"N.A"); room_per=0; T_Room_A=9; } void No_r6() { room_no=6; strcpy(room_type,"Junior Suite_R"); room_charge=E_Dollar*302; room_avail='Y'; strcpy(r_cust,"N.A"); room_per=0; T_Room_A=6; } void No_r7() { room_no=7; strcpy(room_type,"Brush Suite_R"); room_charge=E_Dollar*337; room_avail='Y'; strcpy(r_cust,"N.A"); room_per=0; T_Room_A=4; } //we can access each variable in everywhere (inside class) mentioned in the above class. //this function created to hold customer information void locate() { { //this function terminated when the Total room availability become less than zero if(0<=T_Room_A) { cout<<"\n Enter Name of Customer :"; cin >>customer; cout<<"\n For how many days you want the room :"; cin>>per; cout<<"\n Enter the name of state you belong to :"; cin>>c_city; cout<<"\n Enter your nationality :"; cin>>customer_nat; cout<<"\n Enter no. of people who want to stay :"; cin>>customer_mem; cout<<"\n--------------\n"; cout<<"\n Room is allocated to "<not available strcpy(r_cust,customer); room_per=per; room_avail='N'; T_Room_A=T_Room_A-1; } else//-->if total room availability <0.....and if the room canceled after locating { cout<<"\n ERROR : Room cannot be allocated ..."; cout<<"\n Room is not available..."; } } } //the following functions are created to hold & initialize food lists void F_1() { F_No=1; F_type="klasionita"; F_price=3.78*E_Dollar; F_per=0; Food_A=45; } void F_2() { F_No=2; F_type="Kitfo "; F_price=9.9*E_Dollar; F_per=0; Food_A=23; } void F_3() { F_No=3; F_type="veggie combo"; F_price=10.9*E_Dollar; F_per=0; Food_A=25; } void F_4() { F_No=4; F_type="sarbi&gelato"; F_price=7.3*E_Dollar; F_per=0; Food_A=12; } void F_5() { F_No=5; F_type="Siga tibs"; F_price=6.7*E_Dollar; F_per=0; Food_A=40; } void F_6() { F_No=6; F_type="selasinto"; F_price=11.9*E_Dollar; F_per=0; Food_A=65; } void F_7() { F_No=7; F_type="Flaunder"; F_price=17.9*E_Dollar; F_per=0; Food_A=21; } void F_8() { F_No=8; F_type="Kasino "; F_price=19.9*E_Dollar; F_per=0; Food_A=37; } void F_9() { F_No=9; F_type="Trandid "; F_price=12.33*E_Dollar; F_per=0; Food_A=56; } void F_10() { F_No=10; F_type="doro wet"; F_price=23.12*E_Dollar; F_per=0; Food_A=85; } //this function created to order food void F_order() { //it is similar with the above way --> with the room if(F_per<=Food_A) { cout<<"\nEnter Your Name :"; cin>>F_customer; cout<<"\nPlease enter how man food you want\n"; cin>>F_per; cout<<"\nyou are ordered "< Rs:"< this method help us to access each function, which created in the class R[0].No_r1(); R[1].No_r2(); R[2].No_r3(); R[3].No_r4(); R[4].No_r5(); R[5].No_r6(); R[6].No_r7(); //***********************this prepared for food function R[0].F_1(); R[1].F_2(); R[2].F_3(); R[3].F_4(); R[4].F_5(); R[5].F_6(); R[6].F_7(); R[7].F_8(); R[8].F_9(); getch(); //the following consoles helps us to make more modular our program cout<<"\n\t\t*****************************************************************"; cout<<"\n\t\t* *"; cout<<"\n\t\t* WELCOME TO HARMONY HOTEL *"; cout<<"\n\t\t* *"; cout<<"\n\t\t* *"; cout<<"Developed By:"; cout<<"GROUP 7 'SOFTWARE ENGINEERING SECTION # A # STUDENTS'"; cout<<"\n\t\t*****************************************************************"; cout<<"\n\t\t*****************************************************************"; getch(); x: //fact information about harmony cout<<"\n\t\t## HARMONY HOTEL ##"; cout<<"\n\t\t4 --> ****STAR HOTEL"; cout<<"\n\t\t\t\t\t\t\t\t\tAddress: Bole Medhanialem, Addis Ababa Ethiopia"; cout<<"\n\t\t\t\t\t\t\t\t\tPhone: 011 618 3100"<>ch; while(ch!=10)//if the user Enter No 10 the program terminate automatically { if(ch>11)//if the user enter grater than 10 it give us Wrong choice..... { cout<<"\nWrong choice ....";//information depend on the if condition getch(); //wait the user until tab something to display goto xyz; //it takes the function of the compiler to the above condition-->(xyz) } switch(ch) //it is a condition that evaluate the user's input...line 648 { case 1://if the user Enter No 1.... { cout<<"\nROOM DETAILS"<>c; if (c=='n'&&c=='N')//if you input.....n...N..... { goto xyz; } else//if you input other button { goto x; } } break;//terminate this case in this....line by using break keyword case 2://if the user input No2 { //Fact information about Harmony Hotel rooms cout<<"\nWELCOME TO ROOM INFORMATION SITE"<>a; // if(a>7)//if the user enter grater then 7....because our total room types are 7 { //information based on the if condition cout<<"\n Please check your room number once again, as your entered room number is invalid...."; getch();//it is similar with the above expression goto ghi;//go back to line -->ghi } //it is a way of giving array index's a=a-1;//this method is necessary because index of array's are started from 0 so,if the user enter No 1 it takes the compiler to index 0 according to this declaration strcpy(N,R[a].room_type);//copy room type to variable N //comparing strings,if N is equal from one of the following list ....then the remaining integer variable's like // a,d,e,f,g,h,i,j....initialized by the correct room name....each one.... d=stricmp(N,"Sheba Queen_R"); e=stricmp(N,"Royal King_R"); f=stricmp(N,"Standard Twin_R"); g=stricmp(N,"Furnished Deluxe_R"); h=stricmp(N,"Emperor Suite_R"); i=stricmp(N,"Junior Suite_R"); j=stricmp(N,"Brush Suite_R"); //if room type is equal from the above list........then we have to call function mentioned inside class if(d==0) { Nb.type1(); } else if(e==0) { Nb.type2(); } else if(f==0) { Nb.type3(); } else if(g==0) { Nb.type4(); } else if(h==0) { Nb.type5(); } else if(i==0) { Nb.type6(); } else if(j==0) { Nb.type7(); } getch(); cout<<"\n\n#################################################################"; cout<<"\nDo you want to exit(y/n) :"; cin>>c; if (c=='n'&&c=='N') { goto xyz; } else { goto x; } } case 3: { int b; def: cout<<"\n Enter Room N_O to be allocated (1-7):"; cin >>b; if(b>7) { cout<<"\n SORRY, Room N_O "<>c; if (c=='n'&&c=='N') { goto xyz; } else { goto x; } } break; case 4: { cout<<"HARMONY HOTEL FOOD MENU"<>c; if (c=='n'&&c=='N') { goto xyz; } else { goto x; } } break; case 5: { int f,r; icj: cout<<"\nPlease enter your Room number\n"; cin>>r; cout<<"\nEnter food N_O t order (1-10):"; cin >>f; if(f>10) { cout<<"\n SORRY, There is no Food listed by this No... Please enter b/w 1-10"; getch(); goto icj; } f=f-1; R[f].F_order(); getch(); cout<<"\n"; cout<<"\n#################################################################"; cout<<"\n Do you want to exit(y/n)"; cin>>c; if (c=='n'&&c=='N') { goto xyz; } else { goto x; } } break; case 6: { stu: int b; cout<<"\n Enter Room no :"; cin>>b; if(b>7) { cout<<"\n Please check your room number once again, as the number you entered is invalid..."; getch(); goto stu; } { char av; av=R[b-1].getavail(); if(av=='Y') { cout<<"\n ERROR: Room is not allocated."; cout<<"\n Bill cannot be created "; getch(); goto xyz; } else { R[b-1].calculate(); R[b-1].displaybill(); getch(); goto xyz; } } } break; case 7: { int n; char j; cout<<"\nTO SEARCH CUSTOMER DATA TAB (S) BUTTON"<>j; if(j=='c'||j=='C') { u: int b1; cout<<"\n Enter Room no :"; cin>>b1; if(b1>7) { cout<<"\n Please check your room number once again, as your entered room number is invalid ..."; getch(); goto u; } { char av; av=R[b1-1].getavail(); if(av=='Y') { cout<<"\n ERROR: Room is not allocated."; getch(); goto xyz; } else { strcpy(R[b1-1].r_cust,"N.A"); R[b1-1].room_per=0; R[b1-1].room_avail='Y'; strcpy(R[b1-1].c_city,"N.A "); strcpy(R[b1-1].customer_nat,"N.A "); R[b1-1].customer_mem = 0; } cout<<"Room booking has been Cancelled successfully....."; getch(); cout<<"\n"; cout<<"\n****************************************************************"; cout<<"\n Do you want to exit(y/n) :"; cin>>c; if (c=='n'||c=='N') { goto xyz; } else { goto x; } } } else if(j=='s'||j=='S') { bc: cout<<"\n Enter room no. :"; cin>>n; if(n>7) { cout<<"\n Wrong choice ...."; getch(); goto bc; } n=n-1; cout<<"\nCUSTOMER DETAILS"; cout<<"\n*****************"; R[n].information(); getch(); } else { cout<<"Wrong...! button"<>c; if (c=='n') { goto xyz; } else { goto xyz; } } break; case 8: { char h; cout<<"\n Choose About the hotel or About the system \n"; cout<<"\n FOR HOTEL INFORMATION CLICK ( H ) BUTTON \n"; cout<<"\n FOR SYSTEM INFORMATION CLICK ( S ) BUTTON \n"; cin >>h; if(h=='h') { H_info(); } else if(h=='s') { S_info(); } else { cout<<"This is all about information"<>c; if (c=='n'&&c=='N') { goto xyz; } else { goto x; } } break; case 9: { C_member(); getch(); cout<<"\n"; cout<<"\n****************************************************************"; cout<<"\n Do you want to exit(y/n)"; cin>>c; if (c=='n'&&c=='N') { goto xyz; } else { goto x; } } break; } } return 0; } void effect() { cout<<"\t\t\t\t\t\t\t\t$$ $$ $$$$$$$ $$$$$$$$$$$$$ $$$$$$$ $$"<